package danli;

public class lanhan {
    private static lanhan instance;
    public lanhan(){
        System.out.println("产生一个学习委员");
    }
    public static lanhan getInstance(){
        if (instance == null) {
            instance=new lanhan();
        }else {
            System.out.println("已经有一个学习委员，不能产生新的学习委员");
        }
        return instance;
    }
    public void getName(){
        System.out.println("我是学习委员:李远远");
    }
}
